Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
boundless-portal
Advanced tools
A higher-order component for the rendering of components outside the normal React tree.
Portal
is used in other components such as Popover
to render content to places like the HTML <body>
tag, avoiding style leakage and parent layout contexts. Only accepts a single top-level child; naked text, etc will be wrapped in a <div>
.
npm i boundless-portal --save
Then use it like:
import Portal from 'boundless-portal';
Portal can also just be directly used from the main Boundless library. This is recommended when you're getting started to avoid maintaining the package versions of several components:
npm i boundless --save
the ES6 import
statement then becomes like:
import { Portal } from 'boundless';
Note: only top-level props are in the README, for the full list check out the website.
There are no required props.
*
· any React-supported attribute
Expects | Default Value |
---|---|
any | n/a |
children
· any normal React child, but must be singular; multiple sibling children must have a common wrapper, such as a "layout" <div>
✅ OK:
<Portal>
foo
</Portal>
<Portal>
<div>foo</div>
</Portal>
<Portal>
<div>
<div>foo</div>
<div>bar</div>
</div>
</Portal>
⛔️ Not OK:
<Portal>
<div>foo</div>
<div>bar</div>
</Portal>
Expects | Default Value |
---|---|
any renderable | null |
destination
· the location to append the generated portal and child elements
Expects | Default Value |
---|---|
HTMLElement | document.body |
portalId
· the ID used to link the portal origin to the destination; added to generated <div>
appended to the destination HTML node
Expects | Default Value |
---|---|
string | null |
FAQs
A higher-order component for the rendering of components outside the normal React tree.
The npm package boundless-portal receives a total of 13 weekly downloads. As such, boundless-portal popularity was classified as not popular.
We found that boundless-portal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.